﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<TimeTableManagement.Entities.Tb_News>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div id="dialog" title="New Category">
        <% using (Html.BeginForm("Create", "Config", FormMethod.Post))
           {%>
            <%: Html.Label("Category") %>
            <input id="displayword" name="displayword" type="text" value="">
            <input id="opntion" name="option" type="hidden" value="newtype"/>
            <input id="keyword" name="keyword" type="hidden" value="newtype"/>
            <%--Tao JS, khi click vao Save, tao keyword ngau nhien dua vao displayword--%>
            <input id="control" name="control" type="hidden" value="New" />
            <input id="action" name="action" type="hidden" value="Create" />
            <p><input type="submit" value="Save" /></p>
         <% } %>
</div>
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" 
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>

<% using (Html.BeginForm()) { %>

    <table class="ui-accordion">
        <tr>
            <td colspan="2">
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.title) %>
                </div>
                <div class="editor-field">
                <input style="width:500px" class="text-box single-line" data-val="true" data-val-required="The Title field is required." id="title" name="title" type="text" value="">
                    <%--<%: Html.EditorFor(model => model.title)%>--%>
                    <%: Html.ValidationMessageFor(model => model.title) %>
                </div>
            </td>
            <td>
                
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.startdate) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.startdate) %>
                    <%: Html.ValidationMessageFor(model => model.startdate) %>
                    <script>
                        $("#startdate").addClass('tcal');
                    </script>
                </div>
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.enddate) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.enddate) %>
                    <%: Html.ValidationMessageFor(model => model.enddate) %>
                    <script>
                        $("#enddate").addClass('tcal');
                    </script>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.urlimage) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.urlimage) %>
                    <%: Html.ValidationMessageFor(model => model.urlimage) %>
                </div>    
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.option) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.option) %>
                    <%: Html.ValidationMessageFor(model => model.option) %>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.status,"Status") %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.status) %>
                    <%: Html.ValidationMessageFor(model => model.status) %>
                </div>   
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.type, "Category") %>
                </div>
                <div class="editor-field">
                    <%: Html.DropDownList("type", String.Empty) %>
                    <%: Html.ValidationMessageFor(model => model.type) %>
                    <a href="#" onclick="jQuery('#dialog').dialog('open'); return false">New Category</a>
                </div>
            </td>
        </tr>
    </table>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.content) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.content) %>
            <%: Html.ValidationMessageFor(model => model.content) %>
        </div>
    <input id="id_user" name="id_user" type="hidden" value="<%: ViewData["session"] %>"/>
        <p>
            <input  type="submit" value="Create" />
        </p>
<% } %>
        

<div>
</div>
</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script src="../../Scripts/tcal.js" type="text/javascript"></script>
<link rel="Stylesheet" type="text/css" href="../../Content/tcal.css" />
<script type="text/javascript">
    $(function () {
        $("#dialog").dialog({
            bgiframe: true,
            height: 150,
            width: 400,
            modal: true,
            autoOpen: false,
            resizable: false
        })
    });
        
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
